import React, {Component} from 'react';

class Home extends Component {
    constructor(props) {
        super(props);
    }

    onClick(path) {
        this.props.history.push(path);
    }

    render() {
        return(
            <div>
                <div onClick={this.onClick.bind(this, `/games/gobang`)}>五子棋</div>
                <div onClick={this.onClick.bind(this, `/games/suduko`)}>数独</div>
                <div onClick={this.onClick.bind(this, `/games/ball`)}>弹球</div>
                <div onClick={this.onClick.bind(this, `/test`)}>test</div>
            </div>
        );
    };
}

export default Home;